#!/usr/bin/env python

class VoIPy(object):
    def __init__(self, *args, **kwargs):
        if args:
            self.parse(args[0])
        else:
            for k,v in kwargs.iteritems():
                setattr(self, k, v)
    def parse(self, buf):
        pass
    def pack(self):
        pass
    def __str__(self):
        return self.pack()
    def __repr__(self):
        return '%s(%s)' % (self.__class__.__name__, ', '.join([
            str(k)
            for k in self.__dict__.keys() 
                if not callable(k) and not k.startswith('_') ])
            )
